package com.eian.boot.module.system.user.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

@Data
@Schema(name = "更新用户请求参数")
public class UserUpdateRequest {
    @Schema(description = "用户Id")
    private Long id;

    @Schema(description = "昵称")
    @Size(max = 50, message = "昵称长度不能超过50个字符")
    private String nickname;

    @Schema(description = "邮箱")
    @Email(message = "邮箱格式不正确")
    private String email;

    @Schema(description = "手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String telephone;

    @Schema(description = "头像URL")
    private String avatar;

    @Schema(description = "状态：0-禁用，1-启用")
    @Range(min = 0, max = 1, message = "状态值只能是0或1")
    private Integer status;

    @Schema(description = "备注信息")
    @Size(max = 500, message = "备注信息长度不能超过500个字符")
    private String remark;
}
